//package com.sx.manage.controller.loan;
//
//import java.io.IOException;
//
//import javax.annotation.Resource;
//import javax.servlet.ServletException;
//
//import org.apache.commons.logging.Log;
//import org.apache.commons.logging.LogFactory;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import com.sx.manage.controller.base.MBaseController;
//import com.sx.manage.service.loan.IMLoanAreaService;
//import com.sx.manage.service.loan.IMLoanService;
//import com.sx.manage.service.loan.MLoanOrderExternalInfoServiceImpl;
//import com.sx.manage.servlet.ViewAndModel;
//import com.sx.model.manage.mybatis.form.loan.MLoanAreaForm;
//import com.sx.model.manage.mybatis.form.loan.MLoanForm;
//import com.sx.model.manage.mybatis.form.loan.MLoanOrderForm;
//import com.sx.model.manage.mybatis.vo.loan.MLoanAreaVO;
//import com.sx.model.manage.mybatis.vo.loan.MLoanOrderVO;
//import com.sx.model.manage.mybatis.vo.loan.MLoanVO;
//import com.sx.model.manage.mybatis.vo.result.ResultBooleanVO;
//import com.sx.model.manage.mybatis.vo.result.ResultListVO;
//
//@Controller
//@RequestMapping("/loan_order")
//public class MLoanOrderController extends MBaseController {
//
//	protected Log logger = LogFactory.getLog(this.getClass());
//	//@Resource(name = "creditService")
//	//private ICreditServiceInterface creditService;
//	@Resource(name = "loanOrderExternalInfoServiceImpl")
//	private MLoanOrderExternalInfoServiceImpl loanOrderExternalInfoServiceImpl;
//
//	@Resource(name = "mLoanAreaInfoServiceImpl")
//	private IMLoanAreaService mLoanAreaInfoServiceImpl;
//	@Resource(name = "mLoanServiceImpl")
//	private IMLoanService mLoanServiceImpl;
//
//	/**
//	 * 贷款基础数据-查询列表视图
//	 * 
//	 * @return
//	 */
//	@RequestMapping("/loan_order_view")
//	public ViewAndModel search_emprunt_order_info() {
//
//		ViewAndModel model = new ViewAndModel(request, cache);
//		model.setViewName("loan/inforCensus");// 修改fitly页面名称
//		// 如需在添加页需要加载元素在此处增加
//		try {
//			ResultListVO<MLoanAreaVO> loan_area_resultVO = mLoanAreaInfoServiceImpl.query_loan_area_list(new MLoanAreaForm());
//			ResultListVO<MLoanVO> resultVO = mLoanServiceImpl.queryProductType(new MLoanForm());
//			MLoanOrderVO vo = new MLoanOrderVO();
//			model.addObject("product_type_list", resultVO.getData());
//			model.addObject("loan_area_list", loan_area_resultVO.getData());
//			model.addObject("vo", vo);
//
//		} catch (Exception ex) {
//			logger.error("贷款基础数据-查询列表视图 跳转异常error={}", ex);
//		}
//		return model;
//	}
//
//	/**
//	 * 贷款基础数据 数据集合
//	 * 
//	 * @param form
//	 * @return
//	 * @throws ServletException
//	 * @throws IOException
//	 */
//	@RequestMapping("/loan_order_page")
//	@ResponseBody
//	public ResultListVO<MLoanOrderVO> search_emprunt_info(MLoanOrderForm form) {
//		if ("".equals(form.getCompany_name())) {
//			form.setCompany_name(null);
//		}
//		if ("".equals(form.getLoan_name())) {
//			form.setLoan_name(null);
//		}
//		if ("".equals(form.getStatus())) {
//			form.setStatus(null);
//		}
//		return loanOrderExternalInfoServiceImpl.loanInfo_query(form);
//	}
//
//	/**
//	 * 贷款基础数据 查询
//	 * 
//	 * @param form
//	 * @return
//	 * @throws ServletException
//	 * @throws IOException
//	 */
//	@RequestMapping("/query_byid/{id}")
//	@ResponseBody
//	public MLoanOrderVO queryBy_loan_info(MLoanOrderForm form) {
//		// 查询类
//		ResultListVO<MLoanOrderVO> result = loanOrderExternalInfoServiceImpl.loanInfo_query(form);
//		if (result.getData().isEmpty()) {
//			return null;
//		}
//		return result.getData().get(0);
//	}
//
//	@RequestMapping("/loan_order_update_status")
//	@ResponseBody
//	public ResultBooleanVO update_loan_update_info(MLoanOrderForm form) {
//		if (null == form) {
//			return new ResultBooleanVO("sj.m.common.edit.error");
//		}
//		return loanOrderExternalInfoServiceImpl.update_loan_order(form);
//	}
//
//}
